<div
  local-class='dashboard-revisions-item {{if this.master "master"}} {{if this.lowPercentage "low-percentage"}} {{if this.mediumPercentage "medium-percentage"}} {{if
    this.highPercentage
    "high-percentage"
  }}'
>
  <div local-class='item'>
    <span role='button' local-class='actionsButton' {{on 'click' (fn this.toggleShowActions)}}>
      {{inline-svg 'assets/gear.svg' local-class='actionsButton-icon'}}
    </span>
    <span local-class='language'>
      <LinkTo @route='logged-in.project.revision.translations' @models={{array @project.id @revision.id}} local-class='language-name'>
        {{this.languageName}}
        {{#if this.rtl}}
          <AccBadge class='tooltip tooltip--top' title={{t 'components.dashboard_revisions.item.rtl'}}>
            {{t 'components.dashboard_revisions.item.rtl_badge'}}
          </AccBadge>
        {{/if}}
      </LinkTo>

      <span local-class='reviewedStats'>
        <span local-class='language-reviewedPercentage'>
          {{this.correctedKeysPercentage}}<span local-class='language-reviewedPercentage-symbol'>%</span>
        </span>

        <div>
          <LinkTo @route='logged-in.project.conflicts' @model={{@project.id}} local-class='reviewedStats-reviewedCount'>
            {{this.toReviewCount}}
            {{t 'components.dashboard_revisions.item.stats_to_review'}}
          </LinkTo>

          {{#unless @revision.isMaster}}
            <span local-class='reviewedStats-translatedCount'>
              {{@revision.translatedCount}}
              {{t 'components.dashboard_revisions.item.stats_translated'}}
            </span>
          {{/unless}}
        </div>
      </span>
    </span>

    <div local-class='progress'>
      <ReviewProgressBar @correctedKeysPercentage={{this.correctedKeysPercentage}} />
    </div>

    {{#if this.showActions}}
      <div local-class='actions'>
        {{#if (get @permissions 'correct_all_revision')}}
          {{#if this.showCorrectAllAction}}
            <AsyncButton
              @onClick={{fn this.correctAllConflicts}}
              @loading={{this.isCorrectAllConflictLoading}}
              @disabled={{this.isAnyActionsLoading}}
              class='button button--green button--highlight button--borderless'
              local-class='actionItem-button'
            >
              {{inline-svg '/assets/check.svg' class='button-icon'}}
              {{t 'components.dashboard_revisions.item.correct_all_button'}}
            </AsyncButton>
          {{/if}}
        {{/if}}
        {{#if (get @permissions 'uncorrect_all_revision')}}
          {{#if this.showUncorrectAllAction}}
            <AsyncButton
              @onClick={{fn this.uncorrectAllConflicts}}
              @loading={{this.isUncorrectAllConflictLoading}}
              @disabled={{this.isAnyActionsLoading}}
              class='button button--red button--highlight button--borderless'
              local-class='actionItem-button'
            >
              {{inline-svg '/assets/revert.svg' class='button-icon'}}
              {{t 'components.dashboard_revisions.item.uncorrect_all_button'}}
            </AsyncButton>
          {{/if}}
        {{/if}}
      </div>
    {{/if}}
  </div>
</div>